//
//  SDCountDownButton.h
//  SKinDiary
//
//  Created by pcyang on 16/7/10.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import <UIKit/UIKit.h>

@class SDCountDownButton;
typedef NSString* (^DidChangeBlock)(SDCountDownButton *countDownButton,int second);
typedef NSString* (^DidFinishedBlock)(SDCountDownButton *countDownButton,int second);

typedef void (^TouchedDownBlock)(SDCountDownButton *countDownButton,NSInteger tag);

@interface SDCountDownButton : UIButton
{
    int _second;
    int _totalSecond;
    
    NSTimer* timer;
    DidChangeBlock didChangeBlock;
    DidFinishedBlock didFinishedBlock;
    TouchedDownBlock touchedDownBlock;
}

-(void)addToucheHandler:(TouchedDownBlock)touchHandler;

-(void)didChange:(DidChangeBlock)didChangeBlock;
-(void)didFinished:(DidFinishedBlock)didFinishedBlock;
-(void)startWithSecond:(int)second;
- (void)stop;
@end
